home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1993 / Internet Info CD-ROM (Walnut Creek) (1993).iso / networking / terms / kermit / d / k20mit.doc < prev    next >
Encoding:
Text File  |  1988-08-16  |  78.7 KB  |  1,815 lines

  1.  
  2. 1. DECSYSTEM-20 KERMIT
  3.  
  4. Authors:    Frank da Cruz, Bill Catchings, Columbia University
  5. Language:   MACRO-20
  6. Version:    4.2(262)
  7. Date:       January 1988
  8.  
  9.  
  10. Kermit-20 Capabilities At a Glance:
  11.  
  12.   Local operation:                   Yes
  13.   Remote operation:                  Yes
  14.   Transfers text files:              Yes
  15.   Transfers binary files:            Yes
  16.   Wildcard send:                     Yes
  17.   ^X/^Y interruption:                Yes
  18.   Filename collision avoidance:      Yes
  19.   Timeouts:                          Yes
  20.   8th-bit prefixing:                 Yes
  21.   Repeat character compression:      Yes
  22.   Alternate block check types:       Yes
  23.   Communication settings:            Yes
  24.   Transmit BREAK:                    Yes
  25.   IBM mainframe communication:       Yes
  26.   Transaction logging:               Yes
  27.   Session logging:                   Yes
  28.   Debug logging:                     Yes
  29.   Raw transmit:                      Yes
  30.   Login scripts:                     Yes
  31.   Act as server:                     Yes
  32.   Talk to server:                    Yes
  33.   Advanced commands for servers:     Yes
  34.   Local file management:             Yes
  35.   Command/init files:                Yes
  36.   Long packets:                      No      
  37.   Sliding windows:                   No
  38.   Handle file attributes:            No
  39.  
  40. Kermit-20  is  a  program that implements the Kermit file transfer protocol for
  41. the Digital Equipment Corporation DECSYSTEM-20 mainframe computer.  It is writ-
  42. ten in MACRO-20 assembly language and should run on any DEC-20 system with ver-
  43. sion 4 of TOPS-20 or later.
  44.  
  45. The Kermit-20 section will describe the things you should know about the DEC-20
  46. file system in order to make effective use of Kermit, and then it will describe
  47. the special features of the Kermit-20 program.
  48.  
  49.  
  50. 1.1. The DEC-20 File System
  51.  
  52. The features of the DEC-20 file system of greatest interest to Kermit users are
  53. the  form of the file specifications, and the distinctions between text and bi-
  54. nary files.
  55.  
  56.  
  57. DEC-20 File Specifications
  58.  
  59. DEC-20 file specifications are of the form 
  60.  
  61.     DEVICE:<DIRECTORY>NAME.TYPE.GEN;ATTRIBUTES
  62.  
  63. where the DIRECTORY, NAME, and TYPE may each be up to 39 characters in  length,
  64. GEN  is  a  generation  (version  number),  and various attributes are possible
  65. (protection code, account, temporary, etc).  Generation and attributes are nor-
  66. mally  omitted.   Device and directory, when omitted, default to the user's own
  67. (or "connected") disk and directory.  Thus NAME.TYPE is normally sufficient  to
  68. specify  a  file,  and only this information is sent along by Kermit-20 with an
  69. outgoing file.
  70.  
  71. The device, directory, name, and type fields  may  contain  uppercase  letters,
  72. digits,  and  the  special  characters  "-"  (dash),  "_" (underscore), and "$"
  73. (dollar sign).  There are no imbedded or trailing spaces.  Other characters may
  74. be  included by prefixing them (each) with a Control-V.  The fields of the file
  75. specification are set off from one another by the punctuation indicated above.
  76.  
  77. The device field specifies a physical or "logical" device upon which  the  file
  78. is  resident.    The  directory field indicates the area on the device, for in-
  79. stance the area belonging to the owner of the file.  Kermit-20 does not  trans-
  80. mit  the  device or directory fields to the target system, and does not attempt
  81. to honor device or directory fields that may appear in incoming file names; for
  82. instance, it will not create new directories.
  83.  
  84. The  name  is  the  primary identifier for the file.  The type, also called the
  85. "extension", is an indicator which, by convention, tells what kind of  file  we
  86. have.    For  instance  FOO.FOR  is  the source of a Fortran program named FOO;
  87. FOO.REL might be the relocatable object module produced by  compiling  FOO.FOR;
  88. FOO.EXE could an executable program produced by LOADing and SAVing FOO.REL, and
  89. so forth.
  90.  
  91. The DEC-20 allows a group of files to be specified in a single file  specifica-
  92. tion  by  including  the  special  "wildcard"  characters,  "*" and "%".  A "*"
  93. matches any string of characters, including no characters at all; a "%" matches
  94. any single character.  Here are some examples:
  95.  
  96. *.FOR   All  files  of  type  FOR  (all  Fortran source files) in the connected
  97.         directory.
  98.  
  99. FOO.*   Files of all types with name FOO.
  100.  
  101. F*.*    All files whose names start with F.
  102.  
  103. F*X*.*  All files whose names start with F and contain at least one X.
  104.  
  105. %.*     All files whose names are exactly one character long.
  106.  
  107. *.%%%*  All files whose types are at least three characters long.
  108.  
  109. Wildcard notation is used on many computer systems in similar ways, and  it  is
  110. the mechanism most commonly used to instruct Kermit to send a group of files.
  111.  
  112.  
  113.                           TEXT FILES AND BINARY FILES
  114.  
  115. The  DEC-20, like most computers, has a file system with its own peculiarities.
  116. Like many other systems, the DEC-20 makes a distinction between text files  and
  117. binary files.  Text files are generally those composed only of printing charac-
  118. ters (letters, digits,  and  punctuation)  and  "carriage  control"  characters
  119. (carriage  return,  line  feed, form feed, tab).  Text files are designed to be
  120. read by people.  Binary files are designed to be read by  a  computer  program,
  121. and  may  have any contents at all.  If you use the DEC-20 TYPE command to dis-
  122. play a text file on your terminal, the result will be  intelligible.    If  you
  123. type  a  binary  file on your terminal, you will probably see mainly gibberish.
  124. You can not always tell a text file from a binary file by its name or directory
  125. information,  though in general files with types like .TXT, .DOC, .HLP are tex-
  126. tual (as are "source files" for computer programs like text formatters and pro-
  127. gramming  language  compilers),  and files with types like .EXE, .REL, .BIN are
  128. binary.
  129.  
  130. The DEC-20 has an unusual word size, 36 bits.  It differs from most other  sys-
  131. tems by storing text in 7-bit, rather than 8-bit, bytes.  Since text is encoded
  132. in the 7-bit ASCII character set, this allows more efficient  use  of  storage.
  133. However,  the  word size is not a multiple of the normal byte size.  The DEC-20
  134. therefore stores five 7-bit characters per word, with one bit left over.
  135.  
  136. It is also possible to store files with other byte sizes.  The  common  layouts
  137. of bytes within a word are shown in Figure 1-1.
  138.  
  139. -------------------------------------------------------------------------------
  140.  
  141.  
  142.      7: Text Files: Five 7-bit bytes per word.
  143.  
  144.          +------+------+------+------+------++
  145.          |      |      |      |      |      ||
  146.          +------+------+------+------+------++
  147.          0      7      14     21     28     35
  148.  
  149.         Normally,  bit 35 is unused and set to zero.  However, in EDIT (or SOS,
  150.         or OTTO) line-numbered files, bit 35 is set to 1 when the word contains
  151.         a line number.
  152.  
  153.  
  154.      8: "Foreign" binary files:  Four 8-bit bytes per word.
  155.  
  156.          +-------+-------+-------+-------+---+
  157.          |       |       |       |       |   |
  158.          +-------+-------+-------+-------+---+
  159.          0       8       16      24      32  35
  160.  
  161.         Bits 32-35 are unused.
  162.  
  163.  
  164.     36: "Native" binary files:  One 36-bit byte per word.
  165.  
  166.          +-----------------------------------+
  167.          |                                   |
  168.          +-----------------------------------+
  169.          0                                   35
  170.  
  171.         All bits are used.
  172.  
  173.                Figure 1-1:   DECSYSTEM-20 Word/Byte Organization
  174.  
  175. -------------------------------------------------------------------------------
  176.  
  177. The  minimum unit of disk allocation on the DEC-20 is a page, 512 36-bit words,
  178. or 2560 7-bit characters, or 2048 8-bit bytes.  Any file that contains at least
  179. one  bit  of information occupies at least a full page on the disk.  The direc-
  180. tory information for a file includes the number of pages occupied on the  disk,
  181. the bytesize of the file, and the number of bytes of that size which are in the
  182. file.  This information can be seen by using the DEC-20 VDIRECTORY command, for
  183. instance
  184.  
  185.     @vdir foo.*
  186.  
  187.        PS:<MY-DIRECTORY>
  188.      Name     Protection    Pages Bytes(Size) Creation
  189.      FOO.COM.1;P774242          1 384(8)     27-Dec-83
  190.         MAC.1;P774242           1 152(7)     27-Dec-83
  191.        .REL.1;P774242           1 39(36)     27-Dec-83
  192.        .EXE.1;P774242           2 1024(36)   27-Dec-83
  193.  
  194.      Total of 5 pages in 4 files
  195.  
  196. In  this  example, FOO.MAC occupies 1 page, and is composed of 152 7-bit bytes.
  197. This file is textual (program source for the MACRO assembler),  152  characters
  198. long.  Programs which read text files (such as text editors, program compilers,
  199. the TYPE command, etc) determine  the  end  of  a  file  from  the  byte  count
  200. specified  in  the directory.  Kermit-20 determines the end of file in the same
  201. way, so although FOO.MAC occupies an entire 2560-byte page of storage, only the
  202. first  152  characters  are transmitted.  Binary files, such as FOO.EXE (an ex-
  203. ecutable DEC-20 program), tend to  occupy  full  pages.    In  this  case  too,
  204. Kermit-20 uses the byte count to determine the end of file.
  205.  
  206. Why  do  you  need  to know all this?  In most cases, you don't.  It depends on
  207. whether you are using the DEC-20 as your "home base".
  208.  
  209.  
  210.                  USING A MICROCOMPUTER TO ARCHIVE DEC-20 FILES
  211.  
  212. Most computers (other than the DEC-10 and DEC-20)  store  characters  in  8-bit
  213. bytes.    Let's call any such system an 8-bit-byte system.  Microcomputers that
  214. run CP/M or MS-DOS or PC-DOS, and any computers  than  run  Unix,  store  these
  215. 8-bit  bytes in a linear sequence.  Certain other 8-bit-byte systems (PDP-11 or
  216. VAX systems with FILES-11, IBM mainframes)  have  more  complex  file  formats.
  217. This  discussion  applies  to  all  linear  8-bit-byte  systems, including most
  218. popular microcomputers.
  219.  
  220. Kermit can send any "native" DEC-20 sequential file,  text  or  binary,  to  an
  221. 8-bit-byte  system  and  bring  it  back to the DEC-20 restored to its original
  222. form.  If you are using a microcomputer to archive your DEC-20 files, you  need
  223. never  concern  yourself  with  details  of byte size or file format.  The same
  224. holds true between two DEC-20s, or a DEC-10 and a DEC-20.
  225.  
  226. There is, however, one special complication of which you should be aware.  Cer-
  227. tain  microcomputer  operating  systems,  notably CP/M, do not have an entirely
  228. satisfactory way of indicating the end of file.  The file length is recorded in
  229. blocks  rather  than bytes.  For text files, the end of file is marked within a
  230. block by inserting a Control-Z after the last data character.    Binary  files,
  231. however,  might easily contain Control-Z characters as data.  Therefore, in or-
  232. der not to lose data, these systems must  transmit  binary  files  in  complete
  233. blocks.  If the binary file is of foreign origin (for instance, from a DEC-20),
  234. and it did not happen to fill up the last block when it was transferred to  the
  235. micro,  then  when  that  file  is sent back to the system of origin in "binary
  236. mode," junk will appear at the end (if it is sent back in "text mode," it could
  237. be  truncated at the first data byte that happened to correspond to Control-Z).
  238. For DEC-20 programs in .EXE format, this generally has no effect  on  the  run-
  239. nability  or behavior of the program.  But for other binary files, particularly
  240. internal format numerical data or relocatable program object (.REL) files,  the
  241. junk  could  have  bad  effects.  For instance, extraneous data at the end of a
  242. .REL file will generally cause LINK to fail to load the file.
  243.  
  244. Most microcomputer Kermit programs have commands to control end-of-file  detec-
  245. tion -- commands like SET FILE TEXT, SET FILE BINARY, SET EOF CTRLZ.
  246.  
  247.  
  248.                 USING THE DEC-20 TO ARCHIVE MICROCOMPUTER FILES
  249.  
  250. You can use Kermit to send textual files from a microcomputer or any 8-bit sys-
  251. tem to the DEC-20 with no special provisions, since Kermit-20  stores  incoming
  252. characters  in 7-bit bytes as text unless you explicitly instruct it otherwise.
  253. But Kermit-20 has no automatic way of distinguishing an  incoming  binary  file
  254. from  an  incoming  text  file.(Unless  the  incoming  file  has an "ITS Binary
  255. Header"; see below.) Binary files from  8-bit-byte  systems  generally  contain
  256. significant data in the 8th bit, which would be lost if the incoming characters
  257. were stored in 7-bit bytes, rendering the file useless when sent  back  to  the
  258. original  system.  Thus if you want to use Kermit to store foreign 8-bit binary
  259. data on the DEC-20, you must tell it to store such files with a bytesize  of  8
  260. rather than 7.  This can be the source of much confusion and inconvenience.  In
  261. particular, you cannot use a "wildcard send" command to send a mixture of  text
  262. and binary files from an 8-bit-byte system to the DEC-20; rather, you must send
  263. all text files with Kermit-20's file bytesize set to 7, and  all  8-bit  binary
  264. files with the bytesize set to 8.
  265.  
  266. Once  you  get the foreign binary file into the DEC-20, stored with the correct
  267. bytesize (as FOO.COM is stored in the example above), you need take no  special
  268. measures  to  send  it back to its system of origin.  This is because Kermit-20
  269. honors the bytesize and byte count from the directory.  For  instance,  if  you
  270. told  Kermit-20  to SEND FOO.*, every file in the example above would be trans-
  271. mitted in the correct manner, automatically.
  272.  
  273. The previous discussion assumes you want to store text files in usable form  on
  274. the  DEC-20.    However, if you are using the DEC-20 purely as a repository for
  275. your microcomputer files, and you have no desire to display or share  the  con-
  276. tents  of those files on the DEC-20, you can SET FILE BYTESIZE 8 for all incom-
  277. ing files, both text and binary.  When the files are sent back to  a  microcom-
  278. puter, they will be stored correctly.
  279.  
  280.  
  281.                          FILES KERMIT-20 CANNOT HANDLE
  282.  
  283. The  Kermit  protocol  can only accommodate transfer of sequential files, files
  284. which are a linear sequence of bytes (or words).
  285.  
  286. Some files on the DEC-20 are not sequential, and cannot be successfully sent or
  287. received  by  Kermit-20.    These  include  directory  files,  files with holes
  288. (missing pages), ISAM files, and RMS files.  These files require  external  in-
  289. formation  (kept  in  the DEC-20's file descriptor block and/or index table) in
  290. order to be reconstructed; when sending files,  Kermit-20  presently  transmits
  291. only  the file name and the contents of the file.  External control information
  292. and file attributes are not transmitted.
  293.  
  294.  
  295. 1.2. Program Operation
  296.  
  297. Kermit-20's prompt is "Kermit-20>".  Kermit-20 will accept a single command  on
  298. the Exec command line, like this:
  299.  
  300.     @
  301.     @Kermit send foo.bar
  302.  
  303.       the file is sent
  304.  
  305.     @
  306.  
  307. or you can run the program interactively to issue several commands, like this:
  308.  
  309.     @
  310.     @Kermit
  311.  
  312.     TOPS-20 Kermit version 4.2(262)
  313.  
  314.     Kermit-20>send foo.*
  315.  
  316.       files are sent
  317.  
  318.     Kermit-20>statistics
  319.  
  320.       performance statistics are printed
  321.  
  322.     Kermit-20>receive
  323.  
  324.       files are received
  325.  
  326.     Kermit-20>exit
  327.     @
  328.  
  329. During   interactive  operation,  you  may  use  the  TOPS-20  help  ("?")  and
  330. recognition (ESC) features freely while typing commands.  A question mark typed
  331. at  any point in a command displays the options available at that point; typing
  332. an ESC character causes the current keyword or filename  to  be  completed  (or
  333. default  value  to be supplied), and a "guide word" in parentheses to be typed,
  334. prompting you for the next field.  If you have not typed sufficient  characters
  335. to  uniquely  specify the keyword or filename (or if there is no default value)
  336. then a beep will be sounded and you may continue typing.
  337.  
  338. Command keywords may be abbreviated to their shortest  prefix  that  sets  them
  339. apart from any other keyword valid in that field.
  340.  
  341. If  you  have  a file called KERMIT.INI in your login directory, Kermit-20 will
  342. execute an automatic TAKE command on it upon initial startup.   KERMIT.INI  may
  343. contain  any  Kermit-20 commands, for instance SET commands, or DEFINEs for SET
  344. macros to configure Kermit-20 to various systems or communications media.
  345.  
  346. Kermit-20 provides most of the commands possible for an "ideal" Kermit program,
  347. as described in the main part of the Kermit User Guide.  The following sections
  348. will concentrate on system-dependent aspects of Kermit-20.
  349.  
  350.  
  351. 1.3. Remote and Local Operation
  352.  
  353. Kermit-20 normally runs in remote mode, with the user sitting at  a  PC.    But
  354. Kermit-20  can  also run in local mode.  Local operation of Kermit-20 is useful
  355. if the DEC-20 has an autodialer, or a hardwired connection to another computer.
  356. When  in  local  mode, file transfer takes place over an assigned TTY line, and
  357. Kermit-20 is free to update your screen with status information, and to  listen
  358. to your keyboard for interrupt characters.
  359.  
  360. -------------------------------------------------------------------------------
  361.  
  362.  
  363.     Local Operation of Kermit-20:
  364.  
  365.      DECSYSTEM-20
  366.     +---------------------------------------+
  367.     |                                       |
  368.     |   +--------------------+              |
  369.     |   | Your Job           |              |
  370.     |   |                    |              |
  371.     |   |   +------------+   | <--Commands  | Your Job's
  372.     |   |   | Kermit-20  +---+--------------+----------------- (-: You
  373.     |   |   |            |   | Display--->  | Controlling TTY
  374.     |   |   |            |   |              |
  375.     |   |   |            |   |              |
  376.     |   |   |            |   | <--Packets   | Kermit's
  377.     |   |   |            +---+--------------+-----------------> Remote
  378.     |   |   +------------+   | Packets-->   | Assigned TTY      System
  379.     |   |                    |              |
  380.     |   +--------------------+              |
  381.     |                                       |
  382.     +---------------------------------------+
  383.  
  384.                   Figure 1-2:   DEC-20 Kermit Local Operation
  385.  
  386. -------------------------------------------------------------------------------
  387.  
  388. Kermit-20 enters local mode when you issue a SET LINE n command, where n is the
  389. octal TTY number of any line other than your own controlling terminal.
  390.  
  391.  
  392. 1.4. Conditioning Your Job for Kermit
  393.  
  394. Kermit-20 does as much as it can to condition your line for file transfer.   It
  395. saves  all  your  terminal  and  link  settings,  and  restores them after use.
  396. However, there are some sources of interference over which Kermit-20  can  have
  397. no control.  In particular, messages issued by superior or parellel forks could
  398. become mingled with Kermit packets and slow things down or stop them  entirely.
  399. For this reason, before using Kermit-20 for any extended period, you should:
  400.    - Type the Exec commands SET NO MAIL-WATCH and SET NO ALERTS
  401.  
  402.    - Make  sure  you  don't have any print or batch jobs pending that were
  403.      submitted with the /NOTIFY option.
  404.  
  405.    - Make sure you don't have any superior or parallel forks that have en-
  406.      abled  terminal  interrupts  on Control-A; these could prevent Kermit
  407.      packets (which start with Control-A) from getting through.
  408.  
  409. After running Kermit, you can restore your mail-watch and alerts by hand.   Al-
  410. ternatively, you could have an Exec command file for invoking Kermit like this:
  411.  
  412.     set no alerts
  413.     set no mail-watch
  414.     kermit
  415.     set mail-watch
  416.     set alert  1:00PM Go to lunch
  417.     set alert  6:00PM Go to dinner
  418.     set alert 11:30PM Go to sleep
  419.  
  420.  
  421. 1.5. Kermit-20 Commands
  422.  
  423. This  section  describes  the Kermit-20 commands -- in detail where they differ
  424. from the "ideal" Kermit, briefly where they coincide.  Kermit-20 has  the  fol-
  425. lowing commands:
  426.           BYE  to remote server.
  427.         CLEAR  a stuck connection
  428.         CLOSE  log file and stop logging remote session.
  429.       CONNECT  as terminal to remote system.
  430.           CWD  change local working directory.
  431.        DEFINE  macros of Kermit-20 commands.
  432.        DELETE  local files.
  433.     DIRECTORY  listing of local files.
  434.          ECHO  a line of text.
  435.          EXIT  from Kermit-20.
  436.        FINISH  Shut down remote server.
  437.           GET  remote files from server.
  438.          HELP  about Kermit-20.
  439.         INPUT  characters from communication line.
  440.         LOCAL  prefix for local file management commands.
  441.           LOG  remote terminal session.
  442.        OUTPUT  characters to communication line.
  443.         PAUSE  between commands.
  444.          PUSH  to TOPS-20 command level.
  445.          QUIT  from Kermit-20
  446.       RECEIVE  files from remote Kermit.
  447.        REMOTE  prefix for remote file management commands.
  448.           RUN  a DEC-20 program.
  449.          SEND  files to remote Kermit.
  450.        SERVER  mode of remote operation.
  451.           SET  various parameters.
  452.          SHOW  various parameters.
  453.         SPACE  inquiry.
  454.    STATISTICS  about most recent file transfer.
  455.          TAKE  commands from a file.
  456.      TRANSMIT  a file "raw".
  457.          TYPE  a local file.
  458.  
  459.  
  460. 1.5.1. Commands for File Transfer
  461.  
  462. Kermit-20  provides  the standard SEND, RECEIVE, and GET commands for transfer-
  463. ring files using the Kermit protocol.
  464.  
  465.  
  466.                                THE SEND COMMAND
  467.  
  468. Syntax:
  469.  
  470. Sending a single file:  
  471.  
  472.     SEND nonwild-filespec1 (AS) [filespec2]
  473.  
  474. Sending multiple files:  
  475.  
  476.     SEND wild-filespec1 (INITIAL) [filespec2]
  477.  
  478. The SEND command causes a file or file group to be sent from the DEC-20 to  the
  479. other  system.    There  are  two  forms  of  the command, depending on whether
  480. filespec1 contains wildcard characters ("*" or "%").   Kermit-20  automatically
  481. recognizes  the  two  cases  and  issues  the  appropriate  guide word, (AS) or
  482. (INITIAL), depending on the form of filespec1.
  483.  
  484.  
  485.   Sending a File Group
  486.  
  487. If filespec1 contains wildcard characters then all matching files will be sent,
  488. in  alphabetical order (according to the ASCII collating sequence) by name.  If
  489. a file can't be opened for read access, it will be skipped.  The  initial  file
  490. in  a wildcard group can be specified with the optional filespec2.  This allows
  491. a previously interrupted wildcard transfer from where it left off, or it can be
  492. used to skip some files that would be transmitted first.
  493.  
  494.  
  495.   Sending a Single File
  496.  
  497. If  filespec1  does  not  contain any wildcard characters, then the single file
  498. specified by filespec1 will be sent.  Optionally,  filespec2  may  be  used  to
  499. specify  the  name  under  which  the  file  will  arrive at the target system;
  500. filespec2 is not parsed or validated in any way by Kermit-20,  but  lower  case
  501. letters  are  raised  to upper case, and leading "whitespace" (blanks and tabs)
  502. are discarded.  If filespec2 is not specified, Kermit-20  will  send  the  file
  503. with  its  own  name.(Control-V's,  which  are  used to quote otherwise illegal
  504. characters in DEC-20 file specifications, are stripped.)
  505.  
  506.  
  507.   SEND Command General Operation:
  508.  
  509. Files will be sent with  their  DEC-20  filename  and  filetype  (for  instance
  510. FOO.BAR, no device or directory field, no generation number or attributes).  If
  511. you expect to be sending files whose names contain characters that would be il-
  512. legal  in  filenames  on the target system, and you know that the Kermit on the
  513. target system does not have the ability to convert incoming filenames, you  can
  514. issue the SET FILE NAMING NORMAL-FORM command to have Kermit-20 replace suspect
  515. characters by X's.
  516.  
  517. Each file will be sent according to its bytesize and byte count from the direc-
  518. tory  unless  you specify otherwise using SET FILE BYTESIZE, or unless the file
  519. has an "ITS Binary" header.  If the bytesize is 8, then four 8-bit  bytes  will
  520. be  sent  from  each  DEC-20  36-bit  word, and the low order four bits will be
  521. skipped.  If other than 8, then five 7-bit bytes will be sent from  each  word,
  522. with  the  8th  bit  of the 5th character set to the value of the remaining bit
  523. ("bit 35") from the word.(This is the same method used by the DEC-20 to  encode
  524. 36-bit data on "ANSI-ASCII" tapes.  It allows not only DEC-20 binary files, but
  525. also the line-sequence-numbered files produced by EDIT, SOS, or OTTO, which use
  526. bit  35  to  distinguish  line  numbers  from  text,  to  be sent and retrieved
  527. correctly.)
  528.  
  529. If communication line parity is being used (see SET PARITY), Kermit-20 will re-
  530. quest that the other Kermit accept a special kind of prefix notation for binary
  531. files.  This is an advanced feature, and not all Kermits have it; if the  other
  532. Kermit  does  not  agree  to use this feature, binary files cannot be sent cor-
  533. rectly.  This includes executable programs (like DEC-20 .EXE files,  CP/M  .COM
  534. files),  relocatable  object  modules  (.REL files), as well as text files with
  535. line sequence numbers.
  536.  
  537. Kermit-20 will also ask the other Kermit whether it can handle a special prefix
  538. encoding  for  repeated characters.  If it can, then files with long strings of
  539. repeated characters will be  transmitted  very  efficiently.    Columnar  data,
  540. highly  indented  text,  and  binary  files are the major beneficiaries of this
  541. technique.
  542.  
  543. If you're running Kermit-20 locally, for instance dialing out from  the  DEC-20
  544. to  another  system  using an autodialer, you should have already run Kermit on
  545. the remote system and issued either a RECEIVE or a SERVER command.    Once  you
  546. give  Kermit-20  the  SEND  command, the name of each file will be displayed on
  547. your screen as the transfer begins; a "." will be displayed for  every  5  data
  548. packets  sucessfully  sent,  and a "%" for every retransmission or timeout that
  549. occurs (you may also elect other typeout options with the SET  DEBUG  command).
  550. If  the  file is successfully transferred, you will see "[OK]", otherwise there
  551. will be an error message.   When  the  specified  operation  is  complete,  the
  552. program  will  sound  a beep.  If you see many "%" characters, you are probably
  553. suffering from a noisy connection.   You  may  be  able  to  cut  down  on  the
  554. retransmissions  by using SET SEND PACKET-LENGTH to decrease the packet length;
  555. this will reduce the probability that a  given  packet  will  be  corrupted  by
  556. noise, and reduce the time required to retransmit a corrupted packet.
  557.  
  558. During local operation, you can type Control-A at any point during the transfer
  559. to get a brief status report.   You may also type Control-X or Control-Z to in-
  560. terrupt the current file or file group.
  561.  
  562.  
  563.                               THE RECEIVE COMMAND
  564.  
  565. Syntax:  RECEIVE [filespec]
  566.  
  567. The  RECEIVE  command  tells Kermit-20 to receive a file or file group from the
  568. other system.  If only one file is being received, you may include the optional
  569. filespec  as  the name to store the incoming file under; otherwise, the name is
  570. taken from the incoming file header.  Even if the name in the header is  not  a
  571. legal TOPS-20 file name, Kermit-20 will store it under that name, in which case
  572. you can refer to it later only by quoting each illegal character (spaces,  con-
  573. trol  characters, etc) with Control-V.  If for some reason an incoming filename
  574. simply  cannot  be  converted  to  legal  form,  the  file  will  be  saved  as
  575. -UNTRANSLATABLE-FILENAME-.KERMIT  (new  generation).  You may also use SET FILE
  576. NAMING NORMAL-FORM to have Kermit-20 choose more conventional names for  incom-
  577. ing files.
  578.  
  579. If  an  incoming  file  has  the  same name as an existing file, Kermit-20 just
  580. creates a new generation of the same name and  type,  for  instance  FOO.BAR.3,
  581. FOO.BAR.4.    The  oldest generation will be automatically deleted, but you can
  582. still UNDELETE it.
  583.  
  584. Incoming files will all be stored with the prevailing bytesize, 7  by  default,
  585. which  is  appropriate for text files.   If you are asking Kermit-20 to receive
  586. binary files from a microcomputer or other 8-bit system, you  must  first  type
  587. SET  FILE BYTESIZE 8.  Otherwise, the 8th bit of each byte will be lost and the
  588. file will be useless when sent back to the system of origin.
  589.  
  590. If you have SET PARITY, then 8th-bit prefixing will be requested.  If the other
  591. side  cannot  do  this,  binary  files cannot be transferred correctly.  In all
  592. cases, Kermit-20 will request the other Kermit to compress repeated characters;
  593. if  the  other  side can do this (not all Kermits know how) there may be a sig-
  594. nificant improvement in transmission speed.
  595.  
  596. If an incoming file does not arrive in its entirety,  Kermit-20  will  normally
  597. discard it; it will not appear in your directory.  You may change this behavior
  598. by using the command SET INCOMPLETE KEEP, which will cause as much of the  file
  599. as arrived to be saved in your directory.
  600.  
  601. If  you  are  running  Kermit-20 locally, you should already have issued a SEND
  602. command (not SERVER -- use the GET command  to  receive  files  from  a  Kermit
  603. server.)  to  the  remote  Kermit,  and then escaped back to DEC-20 Kermit.  As
  604. files arrive, their names will be displayed on your screen, along with "."  and
  605. "%"  characters  to  indicate the packet traffic; you can type Control-A during
  606. the transfer for a brief status report.
  607.  
  608. If a file arrives that you don't really want, you can attempt to cancel  it  by
  609. typing  Control-X;  this sends a cancellation request to the remote Kermit.  If
  610. the remote Kermit understands this request (not all implementations  of  Kermit
  611. support  this feature), it will comply; otherwise it will continue to send.  If
  612. a file group is being sent, you can request the entire group  be  cancelled  by
  613. typing Control-Z.
  614.  
  615.  
  616.                                 THE GET COMMAND
  617.  
  618. Syntax: GET [remote-filespec]
  619.  
  620. The  GET command requests a remote Kermit server to send the file or file group
  621. specified by remote-filespec.  This command can be used only when  there  is  a
  622. Kermit server on the other end of the line.  This means that you must have CON-
  623. NECTed to the other system, logged in, run Kermit there, issued the SERVER com-
  624. mand,  and escaped back to the DEC-20, or else you Kermit-20 is in remote mode,
  625. TAKEing commands from a file, and interacting with a local Kermit server.
  626.  
  627. The remote filespec is any string that can be a legal  file  specification  for
  628. the remote system; it is not parsed or validated locally.  You should not put a
  629. trailing comment on the GET command, since this will be sent  as  part  of  the
  630. remote filespec.
  631.  
  632. If  you  need  to  include otherwise illegal characters such as "!" or ";" (the
  633. normal command comment delimeters), "?" (the command help character), "@"  (the
  634. indirect  command  file  indicator),  or  certain  control characters, then you
  635. should precede each such character by a  Control-V.    Kermit-20  will  discard
  636. these  Control-V  quoting prefixes before sending the file specification to the
  637. remote host.
  638.  
  639. If you want to store the incoming file name with  a  different  name  than  the
  640. remote host sends it with, just type GET alone on a line; Kermit-20 will prompt
  641. you separately for the source (remote) and destination (local) file  specifica-
  642. tion.    If more than one file arrives, only the first one will be stored under
  643. the name given; the rest will be stored under the names  they  are  sent  with.
  644. Example:
  645.  
  646.     Kermit-20>get
  647.      Remote Source File: profile exec a1
  648.      Local Destination File: profile.exec
  649.  
  650. As  files  arrive, their names will be displayed on your screen, along with "."
  651. and "%" characters to indicate the packet traffic.  As in the RECEIVE  command,
  652. you  may  type  Control-A  to get a brief status report, ^X to request that the
  653. current incoming file be cancelled, ^Z to  request  that  the  entire  incoming
  654. batch be cancelled.
  655.  
  656. If the remote Kermit is not capable of server functions, then you will probably
  657. get an error message back from it like "Illegal packet type".   In  this  case,
  658. you  must  connect  to  the other Kermit, give a SEND command, escape back, and
  659. give a RECEIVE command.
  660.  
  661.  
  662.                             THE STATISTICS COMMAND
  663.  
  664. Give statistics about the most recent file transfer.  For instance, here's what
  665. Kermit-20  displayed  after  transmitting  a short binary file, using repeated-
  666. character compression:
  667.  
  668.      Maximum number of characters in packet:  80 received; 80 sent
  669.      Number of characters transmitted in 2 seconds
  670.             Sent:      34           Overhead:       34
  671.             Received:  107          Overhead:       -408
  672.       Total received:  141          Overhead:       -374
  673.      Total characters transmitted per second:       70
  674.      Effective data rate:   2570 baud
  675.      Efficiency:            214.1667 per cent
  676.      Interpacket pause in effect: 0 sec
  677.  
  678.      Timeouts: 0
  679.      NAKs:     0
  680.  
  681. Note that the data compression allowed the effective baud rate  to  exceed  the
  682. actual  speed of the communication line, which in this case happened to be 1200
  683. baud.  The efficiency is displayed only if the actual baud rate is known.
  684.  
  685.  
  686. 1.5.2. Server Operation
  687.  
  688.  
  689.                               THE SERVER COMMAND
  690.  
  691. The SERVER command puts a  remote  Kermit-20  in  "server  mode",  so  that  it
  692. receives  all further commands in packets from the local Kermit.  The Kermit-20
  693. server is capable (as of this writing) of executing the following remote server
  694. commands:   SEND, GET, FINISH, BYE, REMOTE DIRECTORY, REMOTE CWD, REMOTE SPACE,
  695. REMOTE DELETE, REMOTE TYPE, REMOTE HELP.
  696.  
  697. Any nonstandard parameters should be selected with SET commands before  putting
  698. Kermit-20 into server mode, in particular the file bytesize.  The DEC-20 Kermit
  699. server can send most files in the correct manner automatically, by  recognizing
  700. the DEC-20 file bytesize.  However, if you need to ask the DEC-20 Kermit server
  701. to receive binary files from an 8-bit-byte system (that  is,  from  almost  any
  702. system  that's  not  a DEC-10 or DEC-20) you must issue the SET FILE BYTESIZE 8
  703. command before putting it into server mode, and then you must only  send  8-bit
  704. binary  files.   You cannot send a mixture of text files and 8-bit binary files
  705. to a Kermit-20 server.
  706.  
  707.  
  708.                              COMMANDS FOR SERVERS
  709.  
  710. When running in local mode, Kermit-20 allows you to give a wide range  of  com-
  711. mands  to  a remote Kermit server, with no guarantee the that the remote server
  712. can process them, since they are all optional features of the protocol.    Com-
  713. mands  for servers include the standard SEND, GET, BYE, and FINISH commands, as
  714. well as the REMOTE command.
  715.  
  716. These commands are generally issued when Kermit-20 is in local mode,  i.e.  you
  717. have  already  connected  to  another  system, run Kermit there and put it into
  718. server mode, and escaped back to Kermit-20.  However, Kermit-20 also allows you
  719. to  operate in the opposite direction, i.e. Kermit-20 is the remote Kermit, and
  720. the local Kermit is in server mode.  This is handy when, for instance, you want
  721. to  transfer a disparate collection of files that can't be readily specified by
  722. a wildcard group, all in a single, unattended operation.  In this case, you can
  723. create  a  TAKE  command  file for Kermit-20 that SENDs and/or GETs the desired
  724. files, and then shuts down local server when done, e.g.:
  725.  
  726.     set delay 0             ; No need to pause before sending
  727.     ; Connect to own directory, leave a blank line for password.
  728.     cwd me:
  729.  
  730.     log transactions        ; Keep a log
  731.     ; Change directories on the PC.
  732.     remote cwd \kermit
  733.  
  734.     send ker:mskerm.doc     ; Send the MS-DOS Kermit manual
  735.     send ker:mskerm.bwr     ; Send the MS-DOS Kermit "beware file"
  736.     ; Now change to the MS-DOS binaries area
  737.     remote cwd \bin
  738.  
  739.     send kb:msvibm.exe      ; Send the executable DOS Kermit program
  740.     ; Put DOS back in default directory
  741.     remote cwd \chris
  742.  
  743.     ; Connect back to default directory on the DEC-20
  744.     cwd me:
  745.  
  746.     close transactions      ; Close transaction log
  747.     send transaction.log    ; Send it
  748.     finish                  ; Shut down DOS Kermit server
  749.  
  750. Commands to servers (GET, BYE, FINISH, REMOTE) can  be  issued  from  a  remote
  751. Kermit-20  only  by  means of a TAKE file.  When Kermit-20 is local (i.e. after
  752. SET LINE), you can issue these commands interactively as well.
  753.  
  754. Syntax: REMOTE command
  755.  
  756. Send the specified command to the remote server.  If the server does not under-
  757. stand  the  command  (all of these commands are optional features of the Kermit
  758. protocol), it will reply with a message like "Unknown Kermit  server  command".
  759. If  does  understand, it will send the results back, and they will be displayed
  760. on the screen.  The REMOTE commands are:
  761.  
  762. CWD [directory] Change Working Directory.  If no directory  name  is  provided,
  763.                 the  server  will  change  to  the  default  or home directory.
  764.                 Otherwise, you will be prompted for a password, and the  server
  765.                 will  attempt  to  change  to  the  specified  directory.   The
  766.                 password is entered on a separate line, and does  not  echo  as
  767.                 you type it.  If access is not granted, the server will provide
  768.                 a message to that effect.  Do not put trailing comments after a
  769.                 REMOTE CWD command, or after the password.
  770.  
  771. DELETE filespec Delete  the  specified  file  or files.  The names of the files
  772.                 that are deleted will appear on your screen.
  773.  
  774. DIRECTORY [filespec]
  775.                 The  names of the files that match the given file specification
  776.                 will be displayed on your screen, perhaps along with  size  and
  777.                 date  information  for  each file.  If no file specification is
  778.                 given, all files from the current directory will be listed.
  779.  
  780. HELP            Provide a list of the functions that  are  available  from  the
  781.                 server.
  782.  
  783. HOST [command]  Pass  the given command to the server's host command processor,
  784.                 and display the resulting output on your screen.
  785.  
  786. SPACE           Provide information about disk usage in the current  directory,
  787.                 such as the quota, the current storage, the amount of remaining
  788.                 free space.
  789.  
  790. TYPE filespec   Display the contents of the specified file on your screen.
  791.  
  792.  
  793. 1.5.3. Commands for Local File Management
  794.  
  795. Syntax: LOCAL [command]
  796.  
  797. Execute the specified command on the  local  system  --  on  the  DEC-20  where
  798. Kermit-20  is  running.    These  commands  provide  some local file management
  799. capability without having to leave the Kermit-20 program.
  800.  
  801. CWD [directory] Change working directory, or, in DEC-20 terminology, CONNECT to
  802.                 the  specified  directory.  If a password is required, you will
  803.                 be prompted for one.  Do not include a trailing  comment  after
  804.                 the password.
  805.  
  806. DELETE filespec Delete  the  specified  file  or files, but do not expunge them
  807.                 (unless you have SET EXPUNGE ON).
  808.  
  809. DIRECTORY [filespec]
  810.                 Provide a directory listing of the specified files.
  811.  
  812. RUN [filespec]  Attempts  to  run  the  specified file, which must be in ".EXE"
  813.                 format (.EXE is the default filetype),  in  an  inferior  fork.
  814.                 Control returns to Kermit-20 when the program terminates.  Once
  815.                 you have used this command, you can restart the same program by
  816.                 issuing   a  RUN  command  with  no  arguments.    If  you  RUN
  817.                 SYSTEM:EXEC, then you will be able to  issue  TOPS-20  commands
  818.                 without  leaving  Kermit;  you  can get back to Kermit from the
  819.                 EXEC by typing the EXEC POP command.
  820.  
  821. SPACE           Show how much space is used and remaining in the current direc-
  822.                 tory.
  823.  
  824. TYPE            Display  the  contents  of  the specified file or files at your
  825.                 terminal.  This works like the DEC-20 TYPE command, except that
  826.                 if  a  file  has a bytesize of 8, Kermit-20 will do 8-bit input
  827.                 from it rather than 7-bit.  Also, the DEC-20 Control-O  command
  828.                 discards  output  only from the file currently being displayed;
  829.                 if multiple files are being typed, then output will resume with
  830.                 the next file.
  831.  
  832. The LOCAL commands may also be used without the "LOCAL" prefix.
  833.  
  834.  
  835. 1.5.4. The CONNECT Command
  836.  
  837. Syntax: CONNECT [number]
  838.  
  839. Establish a terminal connection to the system connected to the octal TTY number
  840. specified here or in the most recent SET LINE command, using full duplex  echo-
  841. ing  and  no  parity  unless otherwise specified in previous SET commands.  Get
  842. back to Kermit-20 by typing the escape character followed by the letter C.  The
  843. escape  character  is Control-Backslash (^\) by default.  When you type the es-
  844. cape character, several single-character commands are possible:
  845.  
  846.   C   Close the connection and return to Kermit-20.
  847.   S   Show status of the connection; equivalent to SHOW LINE.
  848.   P   Push to a new Exec.  POP from the Exec to get back to the connection.
  849.   Q   If a session log is active, temporarily Quit logging.
  850.   R   Resume logging to the session log.
  851.   B   Send a simulated BREAK signal.
  852.   ?   List all the possible single-character arguments.
  853.   ^\ (or whatever you have set the escape character to be):
  854.       Typing  the  escape character twice sends one copy of it to the connected
  855.       host.
  856.  
  857. You can use the SET ESCAPE command to define a different escape character,  and
  858. SET  PARITY, SET DUPLEX, SET HANDSHAKE, SET FLOW, and SET SPEED to change those
  859. communication-line-oriented parameters.  In order for the simulated BREAK  sig-
  860. nal  to work, TOPS-20 must know the speed of the terminal.  If it does not, you
  861. may use the SET SPEED command.  Type the  SHOW  LINE  command  for  information
  862. about your current communication settings.
  863.  
  864. Kermit-20  does not have any special autodialer interface.  It assumes that the
  865. connection has already been made and the line assigned.
  866.  
  867.  
  868. 1.5.5. The SET, SHOW, and DEFINE Commands
  869.  
  870. SET is used for establishing or changing  parameters,  DEFINE  lets  you  group
  871. several  SET commands together into a single "macro" command, and SHOW lets you
  872. examine current settings or macro definitions.
  873.  
  874.  
  875.                                 THE SET COMMAND
  876.  
  877. Syntax: SET parameter [option [value]]
  878.  
  879. Establish or modify various parameters for file transfer  or  terminal  connec-
  880. tion.    You  can  examine  their  values with the SHOW command.  The following
  881. parameters may be SET:
  882.                BREAK  Adjust the BREAK simulation parameter
  883.          BLOCK-CHECK  Packet transmission error detection method
  884.            DEBUGGING  Record or display state transitions or packets
  885.                DELAY  How long to wait before starting to send
  886.               DUPLEX  For terminal connection, FULL or HALF
  887.               ESCAPE  Character for terminal connection
  888.                 FILE  For setting file parameters like byte size
  889.         FLOW-CONTROL  For enabling or disabling XON/XOFF flow control
  890.            HANDSHAKE  For turning around half duplex communication line
  891.                  IBM  For communicating with an IBM mainframe
  892.           INCOMPLETE  What to do with an incomplete file
  893.                INPUT  For specifying behavior of the INPUT command
  894.           ITS-BINARY  For recognizing a special 8-bit binary file format
  895.                 LINE  TTY line to use for file transfer or CONNECT
  896.               PARITY  Character parity to use
  897.               PROMPT  Change the program's command prompt
  898.              RECEIVE  Various parameters for receiving files
  899.                RETRY  How many times to retry a packet before giving up
  900.                 SEND  Various parameters for sending files
  901.                SPEED  Baud rate of communication line
  902.           TVT-BINARY  For negotiating binary mode on ARPANET
  903.  
  904. The DEFINE command may be used to compose "macros" by combining  SET  commands.
  905. Those  SET  commands  which differ from the "ideal" Kermit are now described in
  906. detail.
  907.  
  908.  
  909. SET BREAK
  910.  
  911. Syntax: SET BREAK n Specify the number of nulls to be sent at 50 baud to  simu-
  912. late a BREAK signal when connected to a remote host via SET LINE and CONNECT.
  913.  
  914.  
  915. SET DEBUG
  916.  
  917. Syntax: SET DEBUG options
  918.  
  919. Record  the packet traffic, either on your terminal or in a file.  Some reasons
  920. for doing this would be to debug a version of Kermit that you are  working  on,
  921. to  record a transaction in which an error occurred for evidence when reporting
  922. bugs, or simply to vary the display you get when  running  Kermit-20  in  local
  923. mode.  Options are:
  924.  
  925. STATES          Show Kermit state transitions and packet numbers (brief).
  926.  
  927. PACKETS         Display each incoming and outgoing packet (lengthy).
  928.  
  929. OFF             Don't display or record debugging information (this is the nor-
  930.                 mal mode).  If debugging was in effect, turn it off  and  close
  931.                 any log file.
  932.  
  933. The  debugging information is recorded in the file specified by the most recent
  934. LOG DEBUGGING command, DEBUGGING.LOG by default.
  935.  
  936.  
  937. SET ESCAPE
  938.  
  939. SET ESCAPE octal-number
  940.  
  941. Specify the control character you want to use to "escape" from  remote  connec-
  942. tions back to Kermit-20.  The default is 34 (Control-\).  The number is the oc-
  943. tal value of the ASCII control character, 1 to 37 (or 177), for instance  2  is
  944. Control-B.  After you type the escape character, you must follow it by a one of
  945. the single-character "arguments" described under the CONNECT command, above.
  946.  
  947.  
  948. SET EXPUNGE
  949.  
  950. SET EXPUNGE ON or OFF
  951.  
  952. Tell whether you want a DELETE command (either the LOCAL DELETE  command  or  a
  953. REMOTE  DELETE  command  sent  to  a  Kermit-20  server) to expunge files as it
  954. deletes them.  On the DEC-20, a deleted file continues to take  up  space,  and
  955. may  be  "undeleted" at a later time in the same session.  To expunge a deleted
  956. file means to remove it completely and irrevocably, freeing its space for  fur-
  957. ther  use.   EXPUNGE is OFF by default; deleted files are not automatically ex-
  958. punged.  SET EXPUNGE applies only to  files  that  are  deleted  explicitly  by
  959. Kermit-20, and not to files that are implicitly deleted when new generations of
  960. existing files are created.
  961.  
  962.  
  963. SET FILE
  964.  
  965. Syntax: SET FILE parameter keyword
  966.  
  967. Establish file-related parameters:
  968.  
  969. BYTESIZE keyword or number
  970.         Byte  size  for  DEC-20  file input/output.  The choices are SEVEN (7),
  971.         EIGHT (8), and AUTO.
  972.  
  973.         SEVEN   (or 7) Always store or retrieve  five  7-bit  bytes  per  word.
  974.                 When  sending a file, ignore the file bytesize and do 7-bit in-
  975.                 put from the file.  There would be no reason to use this option
  976.                 except  to  explicitly  force  an 8-bit file to be treated as a
  977.                 7-bit file.
  978.  
  979.         EIGHT   (or 8) Always store or retrieve  four  8-bit  bytes  per  word.
  980.                 When  sending a file, ignore the file bytesize and do 8-bit in-
  981.                 put from the file.  This command is  necessary  when  receiving
  982.                 binary  files  from  8-bit-byte systems, such as most microcom-
  983.                 puters.
  984.  
  985.         AUTO    Equivalent to SEVEN for incoming files, and for outgoing  files
  986.                 means to use EIGHT if the DEC-20 file bytesize (as shown by the
  987.                 Exec VDIR command) is 8, otherwise use SEVEN.  The  default  is
  988.                 AUTO.
  989.  
  990. The DEC-20 can send any mixture of file types in the correct way automatically,
  991.         but you must set the file bytesize to 8 for any incoming  8-bit  binary
  992.         files,  and  to AUTO (i.e. 7) for any incoming text files or DEC-20 bi-
  993.         nary files.
  994.  
  995. NAMING UNTRANSLATED or NORMAL-FORM
  996.         If  NORMAL-FORM  the  names  of incoming or outgoing files will be con-
  997.         verted to contain only uppercase  letters,  digits,  and  at  most  one
  998.         period;  any  other  characters will be translated to "X".  If UNTRANS-
  999.         LATED, filenames will be sent and used literally.  UNTRANSLATED is  the
  1000.         default.
  1001.  
  1002.  
  1003. SET IBM
  1004.  
  1005. Syntax: SET IBM ON or OFF
  1006.  
  1007. SET IBM is really a predefined SET macro rather than a "hardwired" SET command;
  1008. it can be redefined or undefined (see DEFINE); as  distributed  from  Columbia,
  1009. Kermit-20 defines IBM to be "parity mark, handshake XON, duplex half".
  1010.  
  1011. SET  IBM  should  be used when running Kermit-20 in local mode, connected to an
  1012. IBM or similar mainframe.  If you have redefined the SET IBM macro,  then  your
  1013. parameters will be used instead.
  1014.  
  1015.  
  1016. SET ITS-BINARY
  1017.  
  1018. Syntax: SET ITS-BINARY ON or OFF
  1019.  
  1020. Specify  whether  ITS-Binary  file headers are to be recognized or ignored.  By
  1021. default, they are recognized.  ITS binary format is a way (devised at  MIT)  of
  1022. storing foreign 8-bit binary data on a 36-bit machine to allow automatic recog-
  1023. nition of these files when sending them out again, so that you  don't  have  to
  1024. depend  on  the file byte size, or to issue explicit SET FILE BYTESIZE commands
  1025. to Kermit.
  1026.  
  1027. An ITS format binary file contains the sixbit characters  "DSK8"  left-adjusted
  1028. in  the  first  36-bit word.  If ITS-BINARY is ON, then Kermit-20 will send any
  1029. file starting with this "header word" using 8-bit input from the file  even  if
  1030. the  file  bytesize  is  not  8,  and  will  not  send  the header word itself.
  1031. Kermit-20 will also store any incoming file that begins with that  header  word
  1032. using  8-bit  bytesize, again discarding the header word itself.  If ITS-BINARY
  1033. is OFF, then the header word, if any, will be sent or kept, and i/o will be ac-
  1034. cording to the setting of FILE BYTESIZE.
  1035.  
  1036. This  facility is provided for compatibility with the file formats used on cer-
  1037. tain public-access CP/M libraries.
  1038.  
  1039.  
  1040. SET INPUT
  1041.  
  1042. Syntax: SET INPUT parameter value
  1043.  
  1044. The INPUT command is used in TAKE command files or DEC-20 Batch  control  files
  1045. as  part  of  the  login  script facility, which is explained in greater detail
  1046. later.  SET INPUT controls the behavior of the INPUT command.   The  parameters
  1047. are as follows:
  1048.  
  1049. SET INPUT DEFAULT-TIMEOUT n
  1050.         n is the number of seconds for an INPUT command to time out  after  not
  1051.         receiving  the requested input, when no interval is explicitly given in
  1052.         the INPUT command.  For instance, if the default timeout interval is 10
  1053.         seconds, then the command 
  1054.  
  1055.             INPUT login:
  1056.  
  1057.         will  look  for the "login:" prompt for 10 seconds.  The default may be
  1058.         overriden by including an explicit interval in the INPUT command:  
  1059.  
  1060.             INPUT 15 login:
  1061.  
  1062.         The default timeout interval is 5 seconds.
  1063.  
  1064. SET INPUT TIMEOUT-ACTION PROCEED or QUIT
  1065.         If  the  INPUT  command  comes  from a Kermit-20 command file (see TAKE
  1066.         command) or a TOPS-20 Batch control file,  then  use  this  command  to
  1067.         specify  whether  processing of the command file should proceed or quit
  1068.         after a timeout occurs.  For TAKE files, the current  command  file  is
  1069.         terminated  and control returns to the invoking level (Kermit-20 prompt
  1070.         level, or a superior TAKE file).  The default action is PROCEED.
  1071.  
  1072. SET INPUT CASE IGNORE or OBSERVE
  1073.         Specify  whether alphabetic case should be ignored ("a" matches "A") or
  1074.         observed ("a" does not match "A")  when  scanning  the  input  for  the
  1075.         specified search string.  By default, aphabetic case is ignored.
  1076.  
  1077. SET  INPUT  commands  are  "global"; the settings are not "pushed" and "popped"
  1078. when entering or leaving TAKE command files.
  1079.  
  1080.  
  1081. SET LINE
  1082.  
  1083. Syntax: SET LINE [octal-number]
  1084.  
  1085. Specify the octal TTY number to use for file transfer or CONNECT.  If you issue
  1086. this command, you will be running Kermit-20 locally, and you must log in to the
  1087. remote system and run Kermit on that side in order to transfer a file.  If  you
  1088. don't  issue  this  command, Kermit-20 assumes it is running remotely, and does
  1089. file transfer over its job's controlling terminal line.  You  can  also  select
  1090. the line directly in the CONNECT command; the command 
  1091.  
  1092.     CONNECT 12
  1093.  
  1094. is equivalent to
  1095.  
  1096.     SET LINE 12
  1097.     CONNECT
  1098.  
  1099. If  you  type  SET LINE with no number argument, you will deassign any previous
  1100. assigned line and revert to remote mode.
  1101.  
  1102. The SHOW LINE command will display the currently  selected  communication  line
  1103. and  its  charactistics, including parity, duplex, handshake, flow control, the
  1104. speed if known, whether carrier is present (if it is a modem-controlled  line),
  1105. and whether Kermit-20 is in local or remote mode.
  1106.  
  1107.  
  1108. SET RECEIVE
  1109.  
  1110. In  addition  to  the  full complement of SET RECEIVE commands described in the
  1111. main part of the Kermit User Guide, you may also SET RECEIVE SERVER-TIMEOUT  to
  1112. a  value  between  0  and  94.    This  specifies the number of seconds between
  1113. timeouts during server command wait, 0 specifies that no timeouts should  occur
  1114. during  server  command  wait.   When a Kermit server times out, it sends a NAK
  1115. packet.  Some systems cannot clear piled-up NAKs from their input  buffers;  if
  1116. you're  using such a system to communicate with a Kermit-20 server, and you ex-
  1117. pect to be leaving the server idle for long periods of  time,  you  should  use
  1118. this command to turn off server command-wait timeouts.
  1119.  
  1120.  
  1121. SET SPEED
  1122.  
  1123. Syntax: SET SPEED n
  1124.  
  1125. Set  the  baud  rate  of the currently selected communication to n, the decimal
  1126. baud rate, for instance 300, 1200, 4800.  When operating in local mode, it  may
  1127. be necessary to issue this command in order to enable BREAK simulation.
  1128.  
  1129.  
  1130. SET TVT-BINARY
  1131.  
  1132. Syntax: SET TVT-BINARY ON or OFF
  1133.  
  1134. Only  for users running Kermit-20 on an ARPANET DEC-20, signed on to an ARPANET
  1135. virtual terminal (TVT) from another host or through an ARPANET TAC.  SET TVT ON
  1136. causes  Kermit-20  to  negotiate binary mode (8-bit) communication with the AR-
  1137. PANET during file transfer.  Without this command, file transfer through a  TVT
  1138. would not work in most cases.
  1139.  
  1140. TVT-BINARY  is  OFF  by default.  If you normally use Kermit-20 through the AR-
  1141. PAnet, you can put the command SET TVT-BINARY ON into your KERMIT.INI file.
  1142.  
  1143. CAUTION: This facility requires certain features in the Release 5  TOPS-20  AR-
  1144. PANET  monitor,  which  may not be present in releases distributed by DEC.  See
  1145. the Kermit-20 source code for details.
  1146.  
  1147.  
  1148.                               THE DEFINE COMMAND
  1149.  
  1150. Syntax: DEFINE macroname [set-option [, set-option [...]]]
  1151.  
  1152. The DEFINE command is available in Kermit-20 for building "macros" of SET  com-
  1153. mands.    The macro name can be any keyword-style character string, and the set
  1154. options are anything you would type after SET in a SET command; several set op-
  1155. tions may be strung together, separated by commas.  Example:  
  1156.  
  1157.     define notimeout send timeout 0, receive timeout 0, receive server 0
  1158.  
  1159. Macro  definitions  may  not include macro names.  You can list all your macros
  1160. and their definitions with the SHOW MACROS command.  You can list a  particular
  1161. macro definition with HELP SET macroname.
  1162.  
  1163.  
  1164.                                THE SHOW COMMAND
  1165.  
  1166. Syntax: SHOW [option]
  1167.  
  1168. The SHOW command displays various information:
  1169.  
  1170. DAYTIME         Current date, time, phase of moon.
  1171.  
  1172. DEBUGGING       Debugging mode in effect, if any.
  1173.  
  1174. FILE-INFO       Byte size for DEC-20 file i/o, incomplete file disposition.
  1175.  
  1176. INPUT           INPUT command parameters.
  1177.  
  1178. LINE            TTY  line,  parity,  duplex,  flow  control,  handshake, escape
  1179.                 character, speed (if known), and  session  loggin  information.
  1180.                 Note  that  before  release 6.0 of TOPS-20, the DEC-20 does not
  1181.                 keep a record of the actual baud rate of a modem-controlled  or
  1182.                 "remote" TTY line.
  1183.  
  1184. MACROS          Definitions for SET macros.
  1185.  
  1186. PACKET-INFO     For  incoming and outbound packets.  Items under RECEIVE column
  1187.                 show parameters for packets Kermit-20 expects to receive, under
  1188.                 SEND shows parameters for outgoing packets.
  1189.  
  1190. TIMING-INFO     Delays, retries, server NAK intervals.
  1191.  
  1192. VERSION         Program  version  of  Kermit-20.    This is also displayed when
  1193.                 Kermit-20 is initially started.
  1194.  
  1195. ALL             (default) All of the above.
  1196.  
  1197.  
  1198. 1.5.6. Program Management Commands
  1199.  
  1200.  
  1201.                                THE TAKE COMMAND
  1202.  
  1203. Syntax: TAKE filespec
  1204.  
  1205. Execute Kermit-20 commands from the specified file.  The file may contain  con-
  1206. tain any valid Kermit-20 commands, including other TAKE commands; command files
  1207. may be nested up to a depth of 20.  Default file type for the command  file  is
  1208. .CMD.    Most  commands may have trailing comments, beginning by semicolon, but
  1209. these should be avoided in REMOTE commands, GET  commands,  and  the  passwords
  1210. that are prompted for after CWD and REMOTE CWD commands.
  1211.  
  1212.  
  1213.                                THE ECHO COMMAND
  1214.  
  1215. Syntax: ECHO line of text
  1216.  
  1217. The  line  of  text is echoed at the terminal.  This is useful when issued from
  1218. within TAKE command files, to report progress or issue instructions.
  1219.  
  1220.  
  1221.                                THE HELP COMMAND
  1222.  
  1223. Syntax: HELP [topic [subtopic]]
  1224.  
  1225. Typing HELP alone prints a brief summary of Kermit-20 and its  commands.    You
  1226. can also type
  1227.  
  1228.     HELP command
  1229.  
  1230. for  any  Kermit-20  command, e.g. "help send" or "help set parity" to get more
  1231. detailed information about a specific command.  Type
  1232.  
  1233.     HELP ?
  1234.  
  1235. to see a list of the available help commands.
  1236.  
  1237.  
  1238.                           THE EXIT AND QUIT COMMANDS
  1239.  
  1240. Syntax: EXIT
  1241.  
  1242. Exit from Kermit-20.  You can CONTINUE  the  program  from  the  TOPS-20  Exec,
  1243. provided  you haven't run another program on top of it.  You can also exit from
  1244. Kermit-20 by typing one or more control-C's, even if  it's  in  the  middle  of
  1245. transferring  a  file.    Kermit-20  will  always  restore your terminal to its
  1246. original condition, and you will be able to CONTINUE the program to get back to
  1247. "Kermit-20>" command level with current settings intact.
  1248.  
  1249. QUIT is a synonym for EXIT.
  1250.  
  1251.  
  1252.                                 THE LOG COMMAND
  1253.  
  1254. Syntax: LOG [option [filespec]]
  1255.  
  1256. Log the specified option to the specified file:
  1257.  
  1258. SESSION         During  CONNECT or execution of a login script, log all charac-
  1259.                 ters that appear on the screen to the specified file.    During
  1260.                 CONNECT,  the  session log can be temporarily turned off during
  1261.                 the remote session by typing the escape character followed by Q
  1262.                 (for  Quit  logging),  and turned on again by typing the escape
  1263.                 character followed by R (for Resume logging).  Default  log  is
  1264.                 SESSION.LOG in the current directory.
  1265.  
  1266. TRANSACTIONS    During  file  transfer,  log  the  progress  of each file.  The
  1267.                 DEC-20 transaction log file looks like this:
  1268.  
  1269.                     Kermit-20 Transaction Log File, Monday 27-Feb-1984
  1270.  
  1271.                     18:40:13: Opened Log: PS:<TIMREK>SAMPLE.LOG.1
  1272.                     18:40:31: -- Send Begins --
  1273.                        8th bit prefixing: Off
  1274.                        Block check type: 1
  1275.                     18:40:31: Opened File: PS:<SY.FDC>LOGIN.CMD.6
  1276.                        Sending As "LOGIN.CMD"
  1277.                        Sent: 547 7-bit bytes
  1278.                     18:40:34: Closed PS:<SY.FDC>LOGIN.CMD.6
  1279.                     18:40:34: Send Complete
  1280.                     18:40:50: -- Receive Begins --
  1281.                        8th bit prefixing: Off
  1282.                        Block check type: 1
  1283.                     18:40:50: Opened: PS:<TIMREK>AUTOEXEC.BAT.1
  1284.                        Written: 186 7-bit bytes
  1285.                     18:40:51: Closed: PS:<TIMREK>AUTOEXEC.BAT.1
  1286.                     18:40:56: Closed Transaction Log
  1287.  
  1288.  
  1289.                 Transaction logging is recommended for long or unattended  file
  1290.                 transfers, so that you don't have to watch the screen.  The log
  1291.                 may be inspected after the transfer is  complete  to  see  what
  1292.                 files  were  transferred  and  what  errors  may have occurred.
  1293.                 Default log is TRANSACTION.LOG in the current directory.
  1294.  
  1295. DEBUGGING       Log STATES or PACKETS, as specified  in  the  most  recent  SET
  1296.                 DEBUGGING  command,  to  the  specified  file.  If log file not
  1297.                 specified, then use TTY if local, or DEBUGGING.LOG in the  cur-
  1298.                 rent  directory  if  remote.    If no SET DEBUGGING command was
  1299.                 previously issued, log STATES to the specified file.  Also  al-
  1300.                 low  specification  of  bytesize  for  the log file, 7 (normal,
  1301.                 default), or 8 (for debugging binary transfers when the  parity
  1302.                 bit is being used for data), for instance 
  1303.  
  1304.                     LOG DEBUGGING BINARY.LOG 8
  1305.  
  1306.                 A 7-bit log file can be typed, printed, or examined with a text
  1307.                 editor or searching program.  An 8-bit log file can only be ex-
  1308.                 amined  with  a system utility like FILDDT.  When logging pack-
  1309.                 ets, each packet  is  preceded  by  a  timestamp,  the  current
  1310.                 timeout interval (preceded by a slash), and "R:" or "S:" to in-
  1311.                 dicate data being received and sent, respectively.  Packet for-
  1312.                 mat is described in the Kermit Protocol Manual.
  1313.  
  1314. SESSION is the default option.  Thus the command "LOG" alone will cause CONNECT
  1315. sessions to be logged in SESSION.LOG in the current directory.  Any  log  files
  1316. are  closed  when you EXIT or QUIT from Kermit, and are reactivated if you CON-
  1317. TINUE the program.  You may explicitly close a log file and  terminate  logging
  1318. with the CLOSE command.
  1319.  
  1320.  
  1321.                                THE CLOSE COMMAND
  1322.  
  1323. Syntax: CLOSE option
  1324.  
  1325. Close the specified log file, SESSION, TRANSACTION, or DEBUGGING, and terminate
  1326. logging to that file.
  1327.  
  1328.  
  1329. 1.6. Login Scripts: The INPUT, OUTPUT, CLEAR, and PAUSE Commands
  1330.  
  1331. When running Kermit-20 in local mode, connecting from  the  DEC-20  to  another
  1332. system  via an external TTY line (for instance, through an autodialer), you may
  1333. use the Kermit-20 INPUT, OUTPUT, CLEAR, and PAUSE commands to carry on a dialog
  1334. with the remote system.  When combined into a "script" in a Kermit-20 TAKE com-
  1335. mand file, or included in a Batch control  file,  these  commands  provide  the
  1336. ability  to  initially  connect and log in to a remote system, and to set it up
  1337. for file transfer.  During script execution, session logging  may  be  used  to
  1338. record the dialog.
  1339.  
  1340.  
  1341.                                THE CLEAR COMMAND
  1342.  
  1343. Syntax: CLEAR
  1344.  
  1345. Clear  the input and output buffers of the currently selected line, and attempt
  1346. to clear any XOFF deadlock.
  1347.  
  1348.  
  1349.                                THE PAUSE COMMAND
  1350.  
  1351. Syntax: PAUSE [interval]
  1352.  
  1353. Pause the specified number of seconds before executing the next command.    The
  1354. default interval is one second.
  1355.  
  1356.  
  1357.                                THE INPUT COMMAND
  1358.  
  1359. Syntax: INPUT [interval] [string]
  1360.  
  1361. On the currently selected communication line, look for the given string for the
  1362. specified interval of time, which is specified in seconds.  If no  interval  is
  1363. specified,  then  wait  for the default interval, which may be specified by SET
  1364. INPUT DEFAULT-TIMEOUT, and is normally 5 seconds.  Specifying an interval of  0
  1365. (or  less) means no timeout -- wait forever for the specified string.  An INPUT
  1366. command can by interrupted by typing one or more Control-C's, which will return
  1367. you to Kermit-20> prompt level.
  1368.  
  1369. Characters  coming  in from the line will be scanned for the search string, and
  1370. when a match is found, the command will terminate successfully; if  the  string
  1371. is  not  found within the given interval, the command will terminate unsuccess-
  1372. fully.  While the INPUT command is active, all incoming characters will  appear
  1373. on your screen.
  1374.  
  1375. The  search string may contain any printable characters.  Control or other spe-
  1376. cial characters that you could not normally type as part of a  command  may  be
  1377. included  by  preceding their octal ASCII values with a backslash, for instance
  1378. foo\15 is "foo" followed by a carriage return (ASCII 15, octal).   A  backslash
  1379. alone  will  be  taken as is, unless it is followed by an octal digit (0-7); if
  1380. you want to actually specify a backslash in this context, double the  backslash
  1381. (\\5 will be taken as \5).
  1382.  
  1383. The  behavior of the INPUT command is governed by the SET INPUT CASE, SET INPUT
  1384. DEFAULT-TIMEOUT, and SET INPUT TIMEOUT-ACTION commands,  as  described  in  the
  1385. Kermit Commands section of the User Guide, or in the Kermit book.
  1386.  
  1387. In  addition  to normal use, Kermit-20 scripts can also be used in DEC-20 batch
  1388. control files.  Failure to match an input string in the timeout  interval  will
  1389. result  in  a  message starting with "?", which signals the Batch controller to
  1390. detect an error.  If INPUT TIMEOUT-ACTION is SET to PROCEED, any timeout  error
  1391. messages  will be issued starting with a "%", which does not signal an error to
  1392. Batch.
  1393.  
  1394. In addition to otherwise untypable control characters (like Control-C), certain
  1395. printable  characters  in  the  search string may need to be "quoted" using the
  1396. backslash mechanism:
  1397.  
  1398. @ (ASCII 100)   If it is the  first  character  in  the  string,  atsign  tells
  1399.                 TOPS-20  that  the  following characters will be the name of an
  1400.                 indirect command file, for instance 
  1401.  
  1402.                     input 10 @foo.txt
  1403.  
  1404.                 tells Kermit to spend 10  seconds  scanning  the  communication
  1405.                 line  input  for  the  string  which  is  contained in the file
  1406.                 FOO.TXT.  If you need to specify a string that starts with "@",
  1407.                 use \100 instead.
  1408.  
  1409. ? (ASCII 77)    A  question  mark tells TOPS-20 to provide a brief help message
  1410.                 about this part of the command; use \77 instead.
  1411.  
  1412. ! (ASCII 41)    If it is the first character  in  the  string,  an  exclamation
  1413.                 point will cause TOPS-20 to ignore the rest of the string, i.e.
  1414.                 treat it as a comment, use \41.
  1415.  
  1416. ; (ASCII 73)    Same as exclamation mark, use \73.
  1417.  
  1418. ( (ASCII 50)    In first position, TOPS-20 will think this marks the  beginning
  1419.                 of a "guide word"; use \50.
  1420.  
  1421. - (ASCII 55)    In  final  position, a dash tells TOPS-20 that the command line
  1422.                 is to be continued, concatenated with the following line.   Use
  1423.                 \55  instead  of  a  final  dash.  For instance, to specify the
  1424.                 string "More?--", use "More\77-\55".
  1425.  
  1426.  
  1427.                               THE OUTPUT COMMAND
  1428.  
  1429. Syntax: OUTPUT string
  1430.  
  1431. The given string is sent out the currently selected communication  line.    The
  1432. string  is  in the same form as the INPUT string; control or special characters
  1433. may be included by prefacing their octal ASCII value with a  backslash.    Note
  1434. that  any  terminating carriage return must be included explicitly as \15.  The
  1435. string will also be echoed at your terminal.
  1436.  
  1437.  
  1438.                               LOGIN SCRIPT HINTS
  1439.  
  1440. It is not a good idea to store  passwords  in  plain  text  in  a  file.    The
  1441. facilities  of the TOPS-20 command parser make this unnecessary, so long as you
  1442. are sitting at your terminal.  Suppose you have a script  that  looks  for  the
  1443. string "Password: " and then outputs your password using a command like 
  1444.  
  1445.     out mypassword\15
  1446.  
  1447. If you change this line to 
  1448.  
  1449.     out @tty:
  1450.  
  1451. you may enter the password from your terminal as follows:
  1452.  
  1453.     login: myuserid
  1454.     Password: mypassword\15^Z
  1455.  
  1456. That  is,  you type the password, a backslash-encoded carriage return, and then
  1457. Control-Z.  This may be done even when executing commands  from  a  TAKE  file;
  1458. after  the ^Z, control returns to the TAKE file.  In the OUTPUT command, "@TTY:
  1459. designates TTY: (your job's controlling terminal) to  be  an  indirect  command
  1460. file;  the  ^Z  is the "end of file" for a terminal.  This same technique could
  1461. have been used in the first script example to allow you to supply from the ter-
  1462. minal  the  name of the file to be sent.  It might be a good idea to for you to
  1463. include an ECHO command in your script file to remind you to do this,  for  in-
  1464. stance:
  1465.  
  1466.     input password:
  1467.     echo ^GType your password, followed by "\15" and then a CTRL-Z
  1468.     output @tty:
  1469.  
  1470. The  ^G  is  a Control-G, which should get your attention by sounding a beep at
  1471. your terminal.
  1472.  
  1473. One might expect to be able to use the same indirect file  mechanism  with  the
  1474. OUTPUT command to provide a crude "raw upload" facility, as in 
  1475.  
  1476.     output @foo.bar
  1477.  
  1478. to  send  the  contents  of  the  file  FOO.BAR  to  the remote system, with no
  1479. synchronization or error checking.  Unfortunately, there are two problems  with
  1480. this  approach:  first,  TOPS-20 converts all carriage return / linefeeds in an
  1481. indirect command file to spaces, and second,  only  very  short  files  may  be
  1482. treated this way, because they must fit within TOPS-20's command "atom" buffer.
  1483. The Kermit-20 TRANSMIT command provides a synchronized raw uploading of files.
  1484.  
  1485.  
  1486. 1.7. Raw Download and Upload
  1487.  
  1488. "Raw Download" is the term commonly used to describe the capture  of  a  remote
  1489. file  on  the  local system, without any kind of error detection or correction.
  1490. This allows you to obtain files from remote systems that do  not  have  Kermit,
  1491. but with the risk of loss or corruption of data.
  1492.  
  1493. Kermit-20  provides  raw downloading via the LOG SESSION command during CONNECT
  1494. to a remote system.  The session log is described above.  To use  session  log-
  1495. ging to capture a file:
  1496.  
  1497.    1. Run Kermit on the DEC-20.
  1498.  
  1499.    2. SET  LINE  to  the TTY number through which you will be connected to
  1500.       the remote system.
  1501.  
  1502.    3. Perform any required SET commands to condition Kermit for communica-
  1503.       tion  with  the remote system.  You may need SET PARITY, SET DUPLEX,
  1504.       SET FLOW, SET HANDSHAKE, etc., depending on the  characteristics  of
  1505.       the remote system and the communication medium.
  1506.  
  1507.    4. CONNECT to the remote system and log in.
  1508.  
  1509.    5. Condition your job on the remote system not to pause at the end of a
  1510.       screenful of text, and give whatever commands may  be  necessary  to
  1511.       achieve a "clean" terminal listing -- for instance, disable messages
  1512.       from the system or other users.
  1513.  
  1514.    6. Type the appropriate command to have the desired file  displayed  at
  1515.       the  terminal,  but do not type the terminating carriage return.  On
  1516.       most systems, the command would be "type", on Unix it's "cat".
  1517.  
  1518.    7. Escape back to Kermit to the DEC-20 and give the  LOG  SESSION  com-
  1519.       mand.
  1520.  
  1521.    8. CONNECT  back  to the remote system and type a carriage return.  The
  1522.       file will be displayed on your screen and recorded  in  the  session
  1523.       log file.
  1524.  
  1525.    9. Escape  back to Kermit on the DEC-20 and give the CLOSE SESSION com-
  1526.       mand.
  1527.  
  1528. The file will be in SESSION.LOG in your connected directory,  unless  you  gave
  1529. another  name  for it in your LOG SESSION command.  You will probably find that
  1530. some editing necessary to remove extraneous prompts, messages, padding  charac-
  1531. ters,  or  terminal escape sequences, or to fill in lost or garbled characters.
  1532. Here's an example showing how to capture a file foo.bar from a remote Unix sys-
  1533. tem:
  1534.  
  1535.     @kermit
  1536.     Kermit-20>set line 23
  1537.     Kermit-20>connect
  1538.     [KERMIT-20: Connecting to remote host over TTY23:,
  1539.      type <CTRL-\>C to return.]
  1540.     4.2 BSD UNIX
  1541.  
  1542.     login: myuserid
  1543.     Password: mypassword
  1544.     % cat foo.bar^\C
  1545.     [KERMIT-20: Connection Closed]
  1546.     Kermit-20>log session foo.bar
  1547.     Kermit-20>connect
  1548.     [KERMIT-20: Connecting to remote host over TTY23:,
  1549.      type <CTRL-\>C to return.]
  1550.     [KERMIT-20: Logging to File FOO.BAR.1]
  1551.     (Type carriage return now.)
  1552.     This is the file foo.bar.
  1553.     It has three lines.
  1554.     This is the last line.
  1555.     % ^\
  1556.     [KERMIT-20: Closing Log File FOO.BAR.1>
  1557.     [KERMIT-20: Connection Closed]
  1558.     Kermit-20>close session
  1559.  
  1560. Note  that  in this case, the Unix "% " prompt at the end of the text will have
  1561. to be edited out.
  1562.  
  1563.  
  1564.                                   RAW UPLOAD
  1565.  
  1566. "Raw Upload" means sending a file from the local system to a remote one,  again
  1567. without  error detection or correction.  This allows you to send files from the
  1568. DEC-20 to remote systems that don't have Kermit.  Kermit-20 provides the TRANS-
  1569. MIT command for this purpose.
  1570.  
  1571. Syntax: TRANSMIT filespec [prompt]
  1572.  
  1573. For  use  in  local mode only.  Sends the specified text file a line at a time,
  1574. "raw" (as is, without using Kermit protocol), to the remote system, waiting for
  1575. the  specified  prompt  for each line.  Only a single file may be sent with the
  1576. TRANSMIT command; wildcards are not allowed in the filespec.  The  file  should
  1577. be  a  text  file, not a binary file.  Since protocol is not being used, no as-
  1578. surance can be given that the file will arrive at the destination correctly  or
  1579. completely.
  1580.  
  1581. The  prompt is any string, for instance the prompt of a line editor in text in-
  1582. sertion mode.  The prompt string may include special  characters  by  preceding
  1583. their  octal  ASCII values with a backslash, e.g. \12 for linefeed, \21 for XON
  1584. (^Q).  The syntax of the prompt string is explained in  greater  detail  above,
  1585. with the INPUT command.
  1586.  
  1587. If  a  prompt  string is supplied, alphabetic case will be ignored in searching
  1588. for it unless you SET INPUT CASE OBSERVE.  If a prompt string is not  supplied,
  1589. then  linefeed  will  be used by default, unless you have performed a SET HAND-
  1590. SHAKE command, in which case the current handshake character will be used.   If
  1591. you  really  want  to  send  the  entire  file without waiting for any prompts,
  1592. specify a prompt of "\0" (ASCII zero, null) (this is not advised).
  1593.  
  1594. The file will be sent using the current settings for duplex, parity,  and  flow
  1595. control.   There are no timeouts on input, as there are with the INPUT command.
  1596. The TRANSMIT command waits forever for the prompt to appear.  However,  if  you
  1597. observe that the transfer is stuck, there are three things you can do:
  1598.  
  1599.    - Type a Carriage Return to transmit the next line.
  1600.  
  1601.    - Type a Control-P to retransmit the line that was just transmitted.
  1602.  
  1603.    - Type  two  Control-C's to cancel the TRANSMIT command and get back to
  1604.      Kermit-20> command level.
  1605.  
  1606. TRANSMIT should be used as follows: CONNECT to the remote  system,  login,  and
  1607. start up some kind of process on the remote system to store input from the ter-
  1608. minal into a file.  On a DEC-20 (that doesn't have Kermit), you could do 
  1609.  
  1610.     copy tty: foo.bar
  1611.  
  1612. or you could start a line editor like EDIT or OTTO and put it into text  inser-
  1613. tion mode.  On a Unix system, you could 
  1614.  
  1615.     cat /dev/tty > foo.bar
  1616.  
  1617. or you could run "ed" and give it the "a" command.
  1618.  
  1619. The  Kermit-20  TRANSMIT  command  will  send  the  first  line of the file im-
  1620. mediately.  Then it will wait for a "prompt"  from  the  remote  system  before
  1621. sending the next line.  When performing a copy operation from the terminal to a
  1622. file, the "prompt" will probably be a linefeed,  "\12"  which  is  the  default
  1623. prompt -- most full duplex systems expect you to type a line of text terminated
  1624. by a carriage return; they echo the characters  you  type  and  then  output  a
  1625. linefeed.    Half duplex systems, on the other hand, use some kind of line tur-
  1626. naround handshake character, like XON (Control-Q), to let you  know  when  they
  1627. are  ready  for the next line of input.  Line editors like EDIT and OTTO prompt
  1628. you with a line number followed by a tab; in that case  your  prompt  character
  1629. would  be "\11" (be careful -- if the remote DEC-20 doesn't think your terminal
  1630. has hardware tabs, it will simulate them by outputting spaces).  In  any  case,
  1631. to  assure synchronization, it is your responsibility to set up the target sys-
  1632. tem to accept line-at-a-time textual input and to determine what  the  system's
  1633. prompt will be when it is ready for the next line.
  1634.  
  1635. Each  line  is sent with a terminating carriage return; linefeeds are not sent,
  1636. since these are supplied by the receiving system if it needs them.  The  TRANS-
  1637. MIT command continues to send all the lines of the file in this manner until it
  1638. reaches the end, or until you interrupt the operation by typing Control-C's.
  1639.  
  1640. If you cannot make the TRANSMIT command work automatically,  for  instance  be-
  1641. cause  the  remote  system's  prompt  changes  for  each line, you may TRANSMIT
  1642. manually by specifying a prompt string that will not appear, and then typing  a
  1643. carriage return at your keyboard for each line you want to send.
  1644.  
  1645. If the TRANSMIT command completes successfully (you'll get a message to the ef-
  1646. fect that the transmission is complete), then you  must  connect  back  to  the
  1647. remote  system  and type whatever command it needs in orderto save and/or close
  1648. the file there.
  1649.  
  1650.  
  1651. 1.8. Kermit-20 Examples
  1652.  
  1653. Here are a few examples of the use of Kermit-20.  Text entered by the  user  is
  1654. underlined.
  1655.  
  1656.  
  1657.                                REMOTE OPERATION
  1658.  
  1659. The  following  example  shows use of Kermit-20 as a server from an IBM PC.  In
  1660. this example, the user runs Kermit on the  PC,  connects  to  the  DEC-20,  and
  1661. starts  Kermit-20 in server mode.  From that point on, the user need never con-
  1662. nect to the DEC-20 again.  In this example, the  user  gets  a  file  from  the
  1663. DEC-20,  works  on it locally at the PC, and then sends the results back to the
  1664. DEC-20.  Note that the user can leave and restart Kermit on the PC as often  as
  1665. desired.
  1666.  
  1667.  A>Kermit
  1668.  Kermit-MS>connect
  1669.  @
  1670.  @Kermit
  1671.  TOPS-20 Kermit version 4.2(262)
  1672.  
  1673.  Kermit-20>server
  1674.  
  1675.   Kermit Server running on DEC-20 host.  Please type your escape
  1676.   sequence to return to your local machine.  Shut down the server by
  1677.   typing the Kermit BYE command on your local machine.
  1678.  ^[C
  1679.  Kermit-MS>get foo.txt
  1680.  
  1681.      The transfer takes place.
  1682.  
  1683.  Kermit-MS>exit
  1684.  A>
  1685.  A>edit foo.txt ; (or whatever...)
  1686.  A>
  1687.  A>Kermit
  1688.  Kermit-MS>send foo.txt
  1689.  
  1690.      The transfer takes place.
  1691.  
  1692.  Kermit-MS>bye
  1693.  A>
  1694.  
  1695. The  next example shows the special procedure you would have to use in order to
  1696. send a mixture of text and binary files from a PC (or an 8-bit-byte system)  to
  1697. the DEC-20.  Note that in this case, it's more convenient to avoid server mode.
  1698.  
  1699.  Kermit-MS>connect
  1700.  @
  1701.  @Kermit
  1702.  TOPS-20 Kermit version 4.2(262)
  1703.  
  1704.  Kermit-20>receive
  1705.  ^]C
  1706.  Kermit-MS>send *.txt
  1707.  
  1708.      Textual files are sent.
  1709.  
  1710.  Kermit-MS>connect
  1711.  Kermit-20>set file bytesize 8
  1712.  Kermit-20>receive
  1713.  ^]C
  1714.  Kermit-MS>send *.exe
  1715.  
  1716.      Binary files are sent.
  1717.  
  1718.  Kermit-MS>connect
  1719.  Kermit-20>exit
  1720.  @logout
  1721.  ^]C
  1722.  Kermit-86>exit
  1723.  A>
  1724.  
  1725.  
  1726.                                 LOCAL OPERATION
  1727.  
  1728. In this example, a program DIAL is used to direct an autodialer to call another
  1729. computer (a DECsystem-10); once the connection is made, DIAL starts Kermit with
  1730. an  implicit  CONNECT  command for the appropriate communication line.  DIAL is
  1731. not part of Kermit; if your system has an autodialer, there will be some  site-
  1732. specific procedure for using it.
  1733.  
  1734.  @dial
  1735.  Dial>dial stevens
  1736.  STEVENS, 1-(201) 555-1234, baud:1200
  1737.  [confirm]
  1738.  Dialing your number, please hold...
  1739.  Your party is waiting on TTY11:.
  1740.  @
  1741.  @Kermit
  1742.  TOPS-20 Kermit version 4.2(262)
  1743.  
  1744.  Kermit-20>connect 11
  1745.  [Kermit-20: Connecting over TTY11:, type <CTRL-\>C to return]
  1746.  
  1747.  CONNECTING TO HOST SYSTEM.
  1748.  Stevens T/S 7.01A(10) 20:20:04 TTY41 system 1282
  1749.  Connected to Node DN87S1(101) Line # 57
  1750.  
  1751.  Please LOGIN or ATTACH
  1752.  
  1753.  .log 10,35
  1754.  JOB 51 Stevens T/S 7.01A(10) TTY41
  1755.  Password:
  1756.  20:20   15-Dec-83       Thur
  1757.  
  1758.  .r new:Kermit
  1759.  
  1760.  TOPS-10 Kermit version 2(106)
  1761.  
  1762.  Kermit-10>server
  1763.  
  1764.  [Kermit Server running on the DEC host.  Please type your escape
  1765.   sequence to return to your local machine.  Shut down the server by
  1766.   typing the Kermit BYE command on your local machine.]
  1767.  ^YC
  1768.  
  1769.  [Kermit-20: Connection Closed.  Back at DEC-20.]
  1770.  
  1771.  Kermit-20>set file bytesize 8
  1772.  Kermit-20>get setdtr.cmd
  1773.  ^A for status report, ^X to cancel file, ^Z to cancel batch.
  1774.  SETDTR.CMD.7 ^A
  1775.   Receiving SETDTR.CMD.7, file bytesize 8
  1776.   (repeated character compression)
  1777.   At page 1
  1778.   Files: 0, packets: 1, chars: 66
  1779.   NAKs: 0, timeouts: 0
  1780.  .[OK]
  1781.  Kermit-20>bye
  1782.  Job 51  User F DA CRUZ [10,35]
  1783.  Logged-off TTY41  at 20:22:58  on 15-Dec-83
  1784.  Runtime: 0:00:01, KCS:33, Connect time: 0:02:39
  1785.  Disk Reads:72, Writes:4, Blocks saved:160
  1786.  ....
  1787.  Hangup? y
  1788.  Click. Call duration was 193 seconds to area 201.
  1789.  Dial>exit
  1790. Note the use of Control-A to get a status report during the transfer.
  1791.  
  1792.  
  1793. 1.9. Installation of Kermit-20
  1794.  
  1795. Kermit-20 is built from a single MACRO-20 source file, K20MIT.MAC.  It requires
  1796. the standard DEC-distributed tools MONSYM, MACSYM, and CMD; the following files
  1797. should  be in SYS: -- MONSYM.UNV, MACSYM.UNV, MACREL.REL, CMD.UNV, and CMD.REL.
  1798. The CMD package is also included with the Kermit distribution as  K20CMD.*,  in
  1799. case you can't find it on your system.
  1800.  
  1801. The  program  should  work on all TOPS-20 systems as distributed, but many cus-
  1802. tomizations are possible.  The site manager may wish to change various  default
  1803. parameters  on  a  site-wide  basis;  this  may  be done simply by changing the
  1804. definitions of the desired symbols, under "subttl  Definitions",  and  reassem-
  1805. bling.
  1806.  
  1807. The  most  notable  site  dependency  is  the definition of "SET IBM".  As dis-
  1808. tributed from Columbia, Kermit-20 defines "SET IBM" in  a  built-in  SET  macro
  1809. definition  as  "parity mark, duplex half, handshake xon".  This definition may
  1810. be found at MACTAB+1, near the end of the impure  data  section.    It  may  be
  1811. changed or deleted, and the program reassembled.
  1812.  
  1813. Sites  that  do not have ARPANET may wish to delete the TVT-BINARY entries from
  1814. SET command tables, SETABL and SETHLP.
  1815.